<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US" dir="ltr">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="<c:url value="/css/shopadmin.css"/>" type="text/css" />
		<link rel="stylesheet" href="<c:url value='/scripts/themes/base/jquery.ui.all.css'/>" type="text/css" />
	</head>
	<body>
		<div id="headBar" class="head_content">
			<div class="finder-action" id="">
				<div class="finder-action-inner clearfix">					 
					<button type="button" wrapimg="true" onclick="location.reload()" class="btn">
						<span><span><i class="finder-icon"><img src="<c:url value="/images/transparent.gif"/>" class="imgbundle icon"
										style="width: 22px; height: 24px; background-position: 0pt -644px;"> </i><fmt:message key="button.refresh" /> </span> </span>
					</button>
					<button type="button" onclick="batchDelete()" class="btn">
						<span><span><i class="finder-icon"><img src="<c:url value="/images/transparent.gif"/>" class="imgbundle icon"
										style="width: 17px; height: 24px; background-position: 0pt -757px;"> </i> <fmt:message key="button.delete" /> </span> </span>
					</button>
				</div>
			</div>

			<div class="finder-header">

				<table width="100%" cellspacing="0" cellpadding="0">
					<!----cols---->
					<col class="span-select" style="width: 24px;" />
					<col style="width: 270px;" />
					<col style="width: 75px;" />
					<col style="width: 150px;" />
					<col style="width: 175px;" />
					<col style="width: 175px;" /> 
					<col style="width: 75px;" />
					<col />
					<!----cols---->
					<thead>
						<tr>
							<td>
								<input type="checkbox"   id="list_ids" class="sellist" />
							</td>
							<td>
								<div   class="cell orderable">
									<table width="100%" cellspacing="0" cellpadding="0">
										<tbody>
											<tr>
												<td>
													<span class="finder-col-label"><fmt:message key="gd_gnofity.name" /></span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</td>
							<td>
								<div key="member_id" class="cell orderable">
									<table width="100%" cellspacing="0" cellpadding="0">
										<tbody>
											<tr>
												<td>
													<span class="finder-col-label"><fmt:message key="gd_gnofity.member_name" /></span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</td>
							<td>
								<div key="email" class="cell orderable">
									<table width="100%" cellspacing="0" cellpadding="0">
										<tbody>
											<tr>
												<td>
													<span class="finder-col-label">Email</span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</td>
							<td>
								<div key="send_time" class="cell orderable">
									<table width="100%" cellspacing="0" cellpadding="0">
										<tbody>
											<tr>
												<td>
													<span class="finder-col-label"><fmt:message key="gd_gnofity.notify_time" /></span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</td>
							<td>
								<div key="creat_time" class="cell orderable">
									<table width="100%" cellspacing="0" cellpadding="0">
										<tbody>
											<tr>
												<td>
													<span class="finder-col-label"><fmt:message key="gd_gnofity.add_time" /></span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</td>
							<td>
								<div key="status" class="cell orderable">
									<table width="100%" cellspacing="0" cellpadding="0">
										<tbody>
											<tr>
												<td>
													<span class="finder-col-label"><fmt:message key="gd_gnofity.status" /></span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</td> 
							<td>
								&nbsp;
							</td>
						</tr>
					</thead>
				</table>
			</div>
		</div>
		<div id="main" class="main_content">
			<div class="finder-list finder-list-normal">
				<form id="list_form" action="gd_gnotify_delete.html" method="post">
					<table id="list_tbl" width="100%" cellspacing="0" cellpadding="0">
						<!----cols---->
						<col class="span-select" style="width: 24px;" />
						<col style="width: 270px;" />
						<col style="width: 75px;" />
						<col style="width: 150px;" />
						<col style="width: 175px;" />
						<col style="width: 175px;" /> 
						<col style="width: 75px;" />
						<col />
						<!----cols---->
						<tbody>
						<c:forEach var="gn" items="${goodsNotifies}" varStatus="index">
							<tr  class="row ">
								<td>
									<input type="checkbox" value="${gn.gnotifyId}" name="goodsNotifies[${index.index}].gnotifyId" class="sel" />
								</td>
								<td  >
									<div class="cell">
										${gn.goodsId}
									</div>
								</td>
								<td key="member_id">
									<div class="cell">
										${gn.memberId}
									</div>
								</td>
								<td key="email">
									<div class="cell">
										${gn.memberId}
									</div>
								</td>
								<td key="send_time">
									<div class="cell">
										${gn.sendTimeString}
									</div>
								</td>
								<td key="creat_time">
									<div class="cell">
										${gn.createTimeString}
									</div>
								</td>
								<td key="status">
									<div class="cell">										
										<fmt:message key="gd_gnofity.status_${gn.status}" />
									</div>
								</td> 
								<td>
									&nbsp;
								</td>
							</tr>
							</c:forEach>
						</tbody>
					</table>
				</form>

			</div>

		</div>
		<div id="footBar" class="foot_content">
			<div class="finder-footer" id="finder-footer-ea2899">
				<div class="finder-page clearfix">
					<div class="span-3">

					</div>
					<div class="span-auto">
						${pagerString }
					</div>
					<div class="span-auto textright">
						<fmt:message key="page.total" >
									<fmt:param><i>${fn:length(orderPaymentCfgs)}</i></fmt:param>
								</fmt:message>
						
					</div>
				</div>
			</div>

		</div>



		<script type="text/javascript" src="<c:url value='/scripts/jquery-1.4.2.js'/>"></script>
		<%@ include file="/jsp/admin/common/messages.jsp"%>
		<script type="text/javascript">
			var selected = 'selected';
			$("#list_ids").click(function() {
				if (this.checked) {
					$('input[type=checkbox]').attr("checked", true);
		
					$('#list_tbl >tbody> tr').addClass(selected);
				} else {
					$('input[type=checkbox]').attr("checked", false);
					$('#list_tbl > tbody > tr').removeClass(selected);
				}
			});

			function changeColor(obj) {
				if ($(obj).attr("checked")) {
					$(obj).parent().parent().addClass(selected);
				} else {
					$(obj).parent().parent().removeClass(selected);
				}
			}

			function batchDelete() {
				var selected = false;
				$('#list_tbl input[type=checkbox]').each(function(i, dom) {
					if ($(dom).attr("checked")) {
						selected = true;
					}
				});
				if (!selected) {
					alert('<fmt:message key="common.selected_deleted" />');
					return;
				}
				if (!confirm('<fmt:message key="common.confirm_deleted" />')) {
					return;
				}
				$('#list_form').submit();
			}
		</script>


	</body>


</html>

